**************************************************************************************************************
**	Replication do-file for "Governmment Policies and the Emergence of an Ethnic Dimension in Party Systems"
**	Author: Maayan Mor
**  FIGURE 2
**************************************************************************************************************

clear all

/* SET DIRECTORY */

use "state wide.dta", clear

graph set window fontface "Times New Roman"

twoway (scatter liberal63 cathp_64, m(o) mc(gs10)) (lowess liberal63 cathp_64, ac(gs14) lw(.7) lc(gs3)), name(g1_l, replace) ///
legend(off) title("r = - 0.04", size(5)) ytitle("Liberal VS 1863", size(4.5)) ///
xtitle("% Catholics", size(4.5))  xlabel(, labsize(4)) ylabel(, labsize(5)) ///
ylabel(0(20)100, labsize(3)) xlabel(0(20)100, labsize(3)) graphregion(color(white)) nodraw

twoway (scatter liberal67 cathp_64, m(o) mc(gs10)) (lowess liberal67 cathp_64, ac(gs14) lw(.7) lc(gs3)), name(g2_l, replace) ///
legend(off) title("r = 0.19", size(5)) ytitle("Liberal VS 1867", size(4.5)) ///
xtitle("% Catholics", size(4.5)) xlabel(, labsize(4)) ylabel(, labsize(5)) ///
ylabel(0(20)100, labsize(3)) xlabel(0(20)100, labsize(3)) graphregion(color(white))  nodraw

twoway (scatter liberal70 cathp_64, m(o) mc(gs10)) (lowess liberal70 cathp_64, ac(gs14) lw(.7) lc(gs3)), name(g3_l, replace) ///
legend(off) title("r = - 0.16", size(5)) ytitle("Liberal VS 1870", size(4.5))  ///
xtitle("% Catholics", size(4.5)) xlabel(, labsize(4)) ylabel(, labsize(5)) ///
ylabel(0(20)100, labsize(3)) xlabel(0(20)100, labsize(3)) graphregion(color(white))  nodraw

twoway (scatter liberal73 cathp_64, m(o) mc(gs10)) (lowess liberal73 cathp_64, ac(gs14) lw(.7) lc(gs3)), name(g4_l, replace) ///
legend(off) title("r = - 0.6", size(5)) ytitle("Liberal VS 1873", size(4.5))  ///
xtitle("% Catholics", size(4.5)) xlabel(, labsize(4)) ylabel(, labsize(5))  ///
ylabel(0(20)100, labsize(3)) xlabel(0(20)100, labsize(3)) graphregion(color(white))  nodraw

twoway (scatter  center70 cathp_64, m(d) mc(gs10)) (lowess  center70 cathp_64, ac(gs14) lw(.7) lc(gs3)), name(g5, replace) ///
legend(off) title("r = 0.74", size(5)) ytitle("Zentrum VS 1870", size(4.5))  ///
xtitle("% Catholics", size(4.5)) xlabel(, labsize(4)) ylabel(, labsize(5)) ///
ylabel(0(20)100, labsize(3)) xlabel(0(20)100, labsize(3)) graphregion(color(white))  nodraw

twoway (scatter  center73 cathp_64, m(d) mc(gs10))  (lowess  center73 cathp_64, ac(gs14) lw(.7) lc(gs3)), name(g6, replace) ///
legend(off) title("r = 0.88", size(5)) ytitle("Zentrum VS 1873", size(4.5))  ///
xtitle("% Catholics", size(4.5)) xlabel(, labsize(4)) ylabel(, labsize(5)) ///
ylabel(0(20)100, labsize(3)) xlabel(0(20)100, labsize(3)) graphregion(color(white))  nodraw

** Conservative parties
twoway (scatter conserv67 cathp_64, m(t) mc(gs10)) (lowess conserv67 cathp_64, ac(gs14) lw(.7) lc(gs3)), name(g2_c, replace) ///
legend(off) title("r = - 0.19", size(5)) ytitle("Con. VS 1867", size(4.5)) ///
xtitle("% Catholics", size(4.5)) xlabel(, labsize(4)) ylabel(, labsize(5)) ///
ylabel(0(20)100, labsize(3)) xlabel(0(20)100, labsize(3)) graphregion(color(white))  nodraw

twoway (scatter conserv70 cathp_64, m(t) mc(gs10)) (lowess conserv70 cathp_64, ac(gs14) lw(.7) lc(gs3)), name(g3_c, replace) ///
legend(off) title("r = - 0.21", size(5)) ytitle("Con. VS 1870", size(4.5))  ///
xtitle("% Catholics", size(4.5)) xlabel(, labsize(4)) ylabel(, labsize(5)) ///
ylabel(0(20)100, labsize(3)) xlabel(0(20)100, labsize(3)) graphregion(color(white))  nodraw

twoway  (scatter conserv73 cathp_64, m(t) mc(gs10)) (lowess conserv73 cathp_64, ac(gs14) lw(.7) lc(gs3)), name(g4_c, replace) ///
legend(off) title("r = - 0.1", size(5)) ytitle("Con. VS 1873", size(4.5))  ///
xtitle("% Catholics", size(4.5)) xlabel(, labsize(4)) ylabel(, labsize(5)) ///
ylabel(0(20)100, labsize(3)) xlabel(0(20)100, labsize(3)) graphregion(color(white))  nodraw

gr combine g1_l g2_l g3_l g4_l g2_c g3_c g4_c g5 g6,  row(3) col(4) hole(5 9 10) graphregion(color(white))
graph export "catholics_vote_shares.png", replace

